#include "Facade.h"

#include <iostream>
using namespace std;

void Television::on()
{
    cout << "on Television" << endl;
}

void Television::off()
{
    cout << "off Television" << endl;
}

void Light::on()
{
    cout << "on Light" << endl;
}

void Light::off()
{
    cout << "off Light" << endl;
}

void Audio::on()
{
    cout << "on Audio" << endl;
}

void Audio::off()
{
    cout << "off Audio" << endl;
}

void Microphone::on()
{
    cout << "on Microphone" << endl;
}

void Microphone::off()
{
    cout << "off Microphone" << endl;
}

void DVDplayer::on()
{
    cout << "on DVDplayer" << endl;
}

void DVDplayer::off()
{
    cout << "off DVDplayer" << endl;
}

KTVMode::KTVMode()
{
    cout << "KTVMode::KTVMode()" << endl;
    _pTV = new Television();
    _pLight = new Light();
    _pAudio = new Audio();
    _pMic = new Microphone();
    _pDvd = new DVDplayer();
}

KTVMode::~KTVMode()
{
    cout << "KTVMode::~KTVMode()" << endl;
    delete _pTV;
    delete _pLight;
    delete _pAudio;
    delete _pMic;
    delete _pDvd;
}

void KTVMode::onKTV()
{
    cout << "KTVMode::onKTV()" << endl;
    _pTV->on();
    _pLight->on();
    _pAudio->on();
    _pMic->on();
    _pDvd->on();
}

void KTVMode::offKTV()
{
    cout << "KTVMode::offKTV()" << endl;
    _pTV->off();
    _pLight->off();
    _pAudio->off();
    _pMic->off();
    _pDvd->off();
}

